package com.testing.class10;

import com.testing.class9.Animal;
import com.testing.class9.Bird;
import com.testing.class9.Mamals;

public class Feeder {

    //投食操作，接收Animal类型的参数。
    public void feed(Animal an){
        System.out.println("饲养员给"+an.kind+"喂食");
        an.eat();
    }

    public void playWithBird(Bird bird){
        System.out.println("饲养员在跟"+bird.kind+"玩接飞盘的游戏");
    }

    public void playWithMammals(Mamals ma){
        System.out.println("饲养员在跟"+ma.kind+"玩踢球的游戏");
    }

}
